﻿<%@ Page Title="" Language="C#" AutoEventWireup="true" %>
<div id="BodyPage" when-scrolled="loadMore()" style="overflow: hidden;">
	<!-- <div class="big_header" ng-show="FinallyPrice > 3000">
        <p class="header_p"><img src="images/ti.png" /></p>
        <p>温馨提示:由于微信支付限制,订单总金额不能超过3000元,请分开下单,谢谢您的合作。</p>
    </div> -->
	<div class="TopContent">购物车</div>
	<div class="ShoppingCartContents" ng-repeat="RuleContainerData in RuleContainerList">
		<div ng-repeat="(Index, RuleGroupData) in RuleContainerData.RuleGroupList">
			<div ng-if="Index === 0 && RuleGroupData.RuleData.Memo">
				<div class="youhui">
					<span ng-if="RuleGroupData.RuleData.Type === 0 && RuleGroupData.RuleData.GiftList.length <= 0" ng-style="{'background':!RuleGroupData.Status?'#9A9A9A':''}">立减</span>
					<span ng-if="RuleGroupData.RuleData.Type === 0 && RuleGroupData.RuleData.GiftList.length > 0" ng-style="{'background':!RuleGroupData.Status?'#9A9A9A':''}">赠送</span>
					<span ng-if="RuleGroupData.RuleData.Type === 1" ng-style="{'background':!RuleGroupData.Status||RuleGroupData.RuleData.ShippingFee>0?'#9A9A9A':''}">邮费</span>
					<span ng-if="RuleGroupData.RuleData.Type === 3" ng-style="{'background':!RuleGroupData.Status?'#f9384d':''}">{{RuleGroupData.Status?'满足':'起拍'}}</span>
					<p>
						<span ng-style="{'color':RuleGroupData.RuleData.Type === 3 && !RuleGroupData.RuleData.Status ? '#f9384d' : '' }">{{RuleGroupData.RuleData.Memo}}</span>
						<span ng-if="RuleGroupData.RuleData.Type === 0 && RuleGroupData.RuleData.DiscountFee > 0 && RuleGroupData.Status" class="ShowDiscountFee">(已优惠:{{RuleGroupData.RuleData.DiscountFee}}元)</span>
						<span ng-if="RuleGroupData.RuleData.Type === 3 && RuleGroupData.Status" class="ShowDiscountFee">(已满足)</span>
					</p>
					<a ng-href="{{RuleGroupData.RuleData.RuleUrl}}">去凑单</a>
				</div>
				<div class="FeeDescribe" ng-if="RuleGroupData.RuleData.Content || RuleContainerData.RuleGroupList.length > 1">
					<span ng-if="RuleGroupData.RuleData.Content">{{RuleGroupData.RuleData.Content}}</span>
					<div ng-repeat="(Index, RuleGroupData) in RuleContainerData.RuleGroupList" ng-if="Index !== 0 && RuleGroupData.RuleData.Memo && (RuleGroupData.RuleData.Type !== 3 || (RuleGroupData.RuleData.Type === 3 && !RuleGroupData.Status))">
						<div class="youhui" style="border: none;" ng-if="RuleGroupData.RuleData.Memo">
							<p><span style="color: #f55">{{RuleGroupData.RuleData.Memo}}</span></p>
						</div>
					</div>
				</div>
			</div>
		</div>
		<ul class="itemlise">
			<li ng-repeat="ProductData in RuleContainerData.ProductList">
				<label for="selected-product-{{ProductData.ProductSkuNo}}" ng-style="{'background-position': ProductSelect[ProductData.ProductSkuNo] ? '-18px 0px' : '1px 0px'}"></label>
				<input id="selected-product-{{ProductData.ProductSkuNo}}" type="checkbox" class="Checkboxs" ng-model="ProductSelect[ProductData.ProductSkuNo]" ng-checked="ProductSelect[ProductData.ProductSkuNo]" ng-change="updateSelectProduct()" />
				<img ng-src="{{ProductData.ThumbnailImgFirstThumb}}" />
				<div class="RightProduct">
					<h5>{{ProductData.ProductName}}</h5>
					<span class="sku" ng-if="ProductData.SkuParamTitle">{{ProductData.SkuParamTitle}}</span>
					<span class="momey">单价:￥{{ProductData.SalePriceFomat}}</span>
					<p class="momeys">
						<span class="reduce" ng-click="addProductQuantity(ProductData, -1)">-</span>
						<input class="count-input" type="text" ng-model="ProductData.Counter" ng-blur="setProductQuantity(ProductData, ProductData.Counter)" />
						<span class="add" ng-click="addProductQuantity(ProductData, 1)">+</span>
					</p>
				</div>
				<a href="/Wap/Shop/ProductDetail.aspx?no={{ProductData.ProductNo}}" class="goproduct">
					<img src="images/usercenter_righticon.png">
				</a>
			</li>
		</ul>
	</div>
	<div ng-if="ProductListIsNull" class="ui-scope">
		<div class="ui-content">
			<div class="bigcart"><img src="images/bigcart.png" /> </div>
			<p>您的购物车暂时还没有商品</p>
			<a href="/Wap/shop/Default.aspx">马上去逛逛</a>
		</div>
	</div>
	<div ng-if="!ProductListIsNull">
		<div class="cart_delete" ng-show="ProductSelectSkuList.length > 0">
			<a href="#" ng-click="removeProduct()">
				<img src="images/cart_delete.png">删除勾选商品
			</a>
		</div>

		<!--推荐商品-->
		<div ng-if="likeData.raw.length" class="container-fluid recom-shop">
			<div class="Recommended row">
				<h5 class="col-xs-12 weini">
                	&lt;为你推荐&gt;
             	</h5>
				<ul class="xiaovtuijian" infinite-scroll='tuijian()'>
					<li ng-repeat="item in likeData.raw">
						<a href="{{item.Url}}" ng-click="likeData.statistics(item.ProductName, [$index])">
							<img data-src="{{item.ProductImage}}" src="images/loading.gif" class="lazy">
							<h6 style="color: #666;font-weight: normal;">{{item.ProductName}}</h6>
							<p class="text-danger onnew">
								<i>￥<span style="font-size: 18px;">{{item.SalePrice}}</span>.00</i>
								<img src="images/gouwuche.png" class="shopcat_photo" />
							</p>
						</a>
					</li>
				</ul>
				<!-- <div style="color: darkgray;">&lt;暂无数据&gt;</div> -->
			</div>
		</div>
		<div id="ShoppingCartFooteBox">
			<div id="ShoppingCartFooter">
				<div class="select-all">
					<label for="selected-product-all" ng-style="{'background-position': ProductSelectAll ? '-18px 0px' : '1px 0px'}"></label>
					<input id="selected-product-all" type="checkbox" class="AllCheckbox" ng-checked="ProductSelectAll" ng-model="ProductSelectAll" ng-change="selectedAllChange()" />全选
				</div>
				<div class="totalPriceDiv">
					<p class="totalPrice">总计:<span style="color:red;">￥{{fomatFloat(FinallyPrice)}}</span></p>
					<p class="totalZhe" ng-show="DiscountPrice>0||ShippingPrice>0">(
						<span ng-show="DiscountPrice > 0">已优惠:<i class="i">￥</i>{{fomatFloat(DiscountPrice)}}</span>
						<span ng-show="ShippingPrice > 0"> 邮费:<i class="i">￥</i>{{fomatFloat(ShippingPrice)}}</span> )
					</p>
				</div>
				<a id="cartbtn" class="cartbtn" ng-click="onSubmit()" ng-style="{'background':submitDisabled?'#9A9A9A':''}">结算</a>
			</div>
		</div>
		<!--<div>{{aaa}}</div>-->
	</div>
</div>